public class CalculatorDemo {

	public static void main(String[] args) {
		// this is how we convert numbers int into strings in arguments.
		// 2+3

		String operand1 = args[0];
		String operator = args[1];
		String operand2 = args[2];

		System.out.println("operand1 =" + operand1);

		System.out.println("operator =" + operator);

		System.out.println("operand2 =" + operand2);

		int op1 = Integer.parseInt(operand1);
		int op2 = Integer.parseInt(operand2);

		if (operator.equals("+")) {

			System.out.println("sum =" + (op1 + op2));

		} else if (operator.equals("-")) {

			System.out.println("sum =" + (op1 - op2));
		}

		String sum = operand1 + operand2;
		System.out.println("sum =" + sum);

	}

}
